package cn.com.twoke.application.game.mario.game.config;

import lombok.Getter;
import lombok.Setter;

/**
 * 游戏配置类
 */
@Getter
@Setter
public class GameConfig {
    
    // 物理系统配置
    private float gravity = 9.8f;
    private float collisionTolerance = 0.01f;
    private float fixedTimeStep = 1.0f / 60.0f;
    
    // 渲染系统配置
    private int targetFps = 60;
    
    // 玩家配置
    private float playerMoveSpeed = 2.0f;
    private float playerJumpForce = 3.8f;
    private float playerCoyoteTime = 0.1f;
    
    // 场景配置
    private int sceneWidth = 20;
    private int sceneHeight = 15;
    private int debugSceneWidth = 70;
    private int debugSceneHeight = 30;
    
    // 单例实例
    private static GameConfig instance;
    
    private GameConfig() {}
    
    public static GameConfig getInstance() {
        if (instance == null) {
            instance = new GameConfig();
        }
        return instance;
    }
    
    /**
     * 重置配置实例（用于测试）
     */
    public static void reset() {
        instance = null;
    }
}